Weekly Coding Checkup 5

A Semester Project made by Custom Designed Activities

We continue working on the Dr. B & Class project. In this first part of the semester, you will apply what we learned in class in a set of tasks and scenarios. Please remember that it is important that the code that you submit is your own code and not somebody else work. It is fine to make mistakes but only by practicing in R you can get a better grasp of the software.

I also want you to try building your document as an official report for a potential company (Dreaming Diamonds LLC) for which you are getting to know and explore the diamonds dataset (e.g., spend time on storytelling, commenting results and providing insights and conclusions when possible).

Summary of this week tasks:

This week we will work on enhancing our visualizations skills. We will go beyond the basic to practice static mapping, faceting, multiple geoms and global vs local mappings. Creating beautiful visualizations is a critical data analytics skill and can lead to interesting insights. So, let’s practice what we covered this week:

• Beyond basic charts

Tip

Use the diamonds dataset to solve all the below tasks. I have subset it to 15k observations to make faster visuals

Q1a:

Write the code necessary to reproduce the chart below. (2 points)

Q1 Chart

Q1b:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart. (3 points)

Q2a:

Use the diamonds dataset and complete the following (3 points): a. Create a scatterplot that show the relation between the depth and table variables. b. Place depth on the x axis and table on y axis. c. Assign a different color for each diamonds cut. d. Assign a static mapping and enforce: - Shape to be equal to 18 and - Size to be equal to 4.

Q2b:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart. (3 points)

Q3a:

Write the code necessary to reproduce the chart below. (3 points).

Q3 Chart

Q3b:

What do you think about this chart?(1 points)

Q4a:

Use the diamonds dataset and complete the following: a. Plot the relationship between carat (y) and depth (x) with both points and a line. b. Do not replicate the mapping. c. Make sure to assign a different color to the lines based on the clarity variable. (3 points).

Q4b:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart. (3 points)

Q5:

Write the code necessary to reproduce the chart below (4 points).

Q3 Chart

Q5b:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart.(3 points)

Q6a:

Use the diamonds dataset and complete the following: a. Create a scatterplot between the carat (y) and x (x) variables. b. Assign a blue color to all points. c. Make sure to display only the diamonds with clarity equal to VS1 or VS2. d. Facet the chart using the cut and the color variables.

Q6b:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart.(3 points)

Bonus Q:

Write the code necessary to reproduce the chart below (3 points).

Bonus Q Chart

BonusQb:

Spend time to interpret your chart: What do you notice? Why is it important? Force yourself to write at least 2 insightful sentences about the above chart.(3 points)

🛑 Don’t Click Submit Just Yet 🚧

Please read carefully the below information:

  • Once you have completed all the coding questions, and your confident in your work, copy and paste your responses from the chunk into the form fields below each question.

  • You are responsible for correctly coping and pasting only the required code to solve each question. We will grade only what you have submitted!

  • We will only grade 1 submission per student so do not click Submit until you are confident in your responses.

  • By submitting this form you are certifying that you have followed the academic integrity guidelines available in the syllabus. The code and answers submitted are the results of your work and your work only!

  • Make sure you have completed all the questions and included all the required personal information (e.g., full name, email, zid) in the respective form’s fields.

  • Now you are ready to click the above “Submit” button. Congrats you have completed your weekly coding check up!!!